package packhib;

	import packhib.HibernateSessionFactory;
	import packhib.Utilisateur;

	import java.util.List;

	import org.hibernate.Criteria;
	import org.hibernate.Session;
	import org.hibernate.Transaction;

public class ServiceEquipe {
	
	
	
	
	public void add(Equipe equipe)
					{
						Session session = HibernateSessionFactory.getSession();
						Transaction tr = session.beginTransaction();
						session.save(equipe);
						tr.commit();
					}
					
					public List listEquipe()
					{
						Session session = HibernateSessionFactory.getSession();
						session.clear();
						Transaction tr = session.beginTransaction();
						Criteria cri = session.createCriteria(Equipe.class);
						List res = cri.list();
						tr.commit();
						
						return res;
					}

				
				
				

			




		

	}

	
	
	
	
	
	
	
	
	
	
	
	
	
	



	
	
	
	
	


